package com.iplant.ams.serviceImpl.dao.dms.scada;

import com.iplant.ams.service.po.dms.scada.status.DMSDeviceDetailStatus;
import com.iplant.ams.service.po.dms.scada.status.DMSDeviceHisStatus;
import com.iplant.base.po.OutResult;
import com.iplant.base.po.Pagination;
import com.iplant.base.utils.annotation.dao.DBBaseDAO;
import com.iplant.base.utils.sql.BaseDAO;
import com.iplant.basic.service.po.bms.BMSEmployee;
import lombok.extern.slf4j.Slf4j;

import java.util.Calendar;
import java.util.HashMap;
import java.util.List;
import java.util.Map;


@DBBaseDAO(DMSDeviceDetailStatus.class)
@Slf4j
public class DMSDeviceDetailStatusDAO extends BaseDAO {

    private static DMSDeviceDetailStatusDAO Instance = null;

    public static DMSDeviceDetailStatusDAO getInstance() {
        if (Instance == null) {
            Instance = new DMSDeviceDetailStatusDAO();
        }
        return Instance;
    }

    public DMSDeviceDetailStatusDAO() {
        super("");this.Init();
    }

    public List<DMSDeviceDetailStatus> DMS_SelectDeviceDetailStatusList(BMSEmployee wLoginUser,
                          List<String> wAssetNoList, List<Integer> wStatusList,
               Calendar wStartTime, Calendar wEndTime,int wActive, Pagination wPagination, OutResult<Integer> wErrorCode){
        Map<String,Object> wParams= new HashMap<>();
        wParams.put("Status", wStatusList);
        wParams.put("AssetNo", wAssetNoList);
        wParams.put("Active", wActive);
        wParams.put("StartTime", wStartTime);
        wParams.put("EndTime", wEndTime);
        return this.SelectPOList(wLoginUser, wParams , wPagination, wErrorCode);
    }


}
